Skip to content

Add NFData instances #11097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add NFData instances #11097

wants to merge 4 commits into from

Conversation

rm41339
Copy link

@rm41339 rm41339 commented Jul 24, 2025

This PR adds the NFData instances necessary for the HLS plugins to function, as recommended here: haskell/haskell-language-server#4615 (comment)

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • [N/A] Manual QA notes have been included.
  • [N/A] Tests have been added. (Ask for help if you don’t know how to write them! Ask for an exemption if tests are too complex for too little coverage!)

@ffaf1
Copy link
Collaborator

ffaf1 commented Jul 24, 2025

Oh I did not see this was not marked as review-needed. Feel free to ignore my comments.

Copy link
Collaborator

@ulysses4ever ulysses4ever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"cabal.project plugin" looks confusing in the context of the Cabal repository. Please, replace all of its occurrences with "cabal.project HLS plugin" (esp. the changelog).

@ulysses4ever
Copy link
Collaborator

@ffaf1 I consider the review-needed label more of our manegerial stuff (to notify Matrix, review during the meetings, and such) rather than an interface for contributors. In practice (I find), when people don't want reviews, they put the PR in the draft state (mostly) because they don't know about the label. So, if the PR isn't in the draft state, it's safe to assume that it can be reviewed, I think.

@fendor
Copy link
Collaborator

fendor commented Jul 24, 2025

"cabal.project plugin" looks confusing in the context of the Cabal repository. Please, replace all of its occurrences with "cabal.project HLS plugin" (esp. the changelog).

These instances are also useful for the hls-cabal-plugin, so perhaps a more general HLS is sufficient.

Copy link
Collaborator

@geekosaur geekosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @ffaf1 but otherwise fine.

Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@geekosaur
Copy link
Collaborator

Looks like there's a couple of rebase conflicts that need to be fixed.

@ulysses4ever
Copy link
Collaborator

@ffaf1 I resolved your older comments: they were straightforward to address and this was done. We can now move forward.

@@ -226,6 +226,9 @@ data AbiTag
instance Binary AbiTag
instance Structured AbiTag

instance NFData AbiTag where
rnf = genericRnf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When Generic is derived, just instance NFData AbiTag is sufficient.
Are there reasons to be more explicit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants